﻿public static partial class Utility
{
    /// <summary>
    /// 数学工具库
    /// </summary>
    public static class Math
    {

        /// <summary>
        /// 是否在两个值的区间（包括两个值）
        /// </summary>
        /// <param name="value"></param>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <returns></returns>
        public static bool IsBetweenValue(int value, int min, int max)
        {
            return value >= min && value <= max;
        }

        /// <summary>
        /// 是否在两个值的区间（包括两个值）
        /// </summary>
        /// <param name="value"></param>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <returns></returns>
        public static bool IsBetweenValue(float value, float min, float max)
        {
            return value >= min && value <= max;
        }
    }
}
